package com.jiazhong.shixi.book.mapper;

import com.jiazhong.shixi.book.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper

public interface UserMapper {
    //登录
    @Select("select * from `user` where username=#{username} and `password`=MD5(#{password})")
    User user_denglu(User user);

    //注册
    @Select("insert into `user` values (null,#{username},md5(#{password}),#{phone},#{email},#{address},1,now(),null,0)")
    void user_zhuce(User user);


}
